package com.tairan.chapter.web.service;

import org.springframework.cache.annotation.CacheEvict;
import org.springframework.cache.annotation.Cacheable;

import java.util.List;

public interface IUserService {

    @Cacheable(value = "users")
    List<String> list();

    @CacheEvict(value = "users", allEntries = true)
    void createOrUpdate(String user);

    @CacheEvict(value = "users", allEntries = true)
    void delete(String user);

}
